import {
  BwCustomComSoltTypeEnum,
  BwCustomComNodeAttrDataTypeEnum,
  BwCustomComNodeAttrFromTypeEnum,
  BwCustomComSlotParamDataTypeEnum,
  type BwCustomComNodeAttrModel,
  type BwCustomComNodeEnableSlotInfoModel,
} from '../../../../render/models'

const attrs: Record<string, BwCustomComNodeAttrModel> = {
  shape: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: 'round',
  },
  disabled: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  labelDisabled: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  labelPosition: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: 'right',
  },
  iconSize: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: '20px',
  },
  checkedColor: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: '#1989fa',
  },
}

const slotList: Array<BwCustomComNodeEnableSlotInfoModel> = [
  {
    visible: true,
    slotType: BwCustomComSoltTypeEnum.convention,
    conventionSlotInfo: {
      slotCode: 'default',
      slotName: '自定义文本',
      slotParams: [
        {
          paramKey: 'checked',
          paramName: '是否选中',
          paramDataType: BwCustomComSlotParamDataTypeEnum.boolean,
          remark: '',
        },
        {
          paramKey: 'disabled',
          paramName: '是否禁用',
          paramDataType: BwCustomComSlotParamDataTypeEnum.boolean,
          remark: '',
        },
      ],
    },
  },
  {
    visible: false,
    slotType: BwCustomComSoltTypeEnum.convention,
    conventionSlotInfo: {
      slotCode: 'icon',
      slotName: '	自定义图标',
      slotParams: [
        {
          paramKey: 'checked',
          paramName: '是否选中',
          paramDataType: BwCustomComSlotParamDataTypeEnum.boolean,
          remark: '',
        },
        {
          paramKey: 'disabled',
          paramName: '是否禁用',
          paramDataType: BwCustomComSlotParamDataTypeEnum.boolean,
          remark: '',
        },
      ],
    },
  },
]

export const vanRadioOptions = {
  attrs,
  slotList,
}
